<?php
/**
 * Created by PhpStorm.
 * User: w-pc
 * Date: 2017/03/07
 * Time: 10:35
 */
namespace Common\Model;
use Think\Model;

class ImageModel extends Model{

    private $_db = '';

    public function __construct() {
        $this->_db = M('image');
    }
    public function get_ImageList(){
        $image_list = $this->_db->where()->select();
        return $image_list;
    }
    public function set_InsertImage($data){
        $i_id = $this->_db->add($data);
        return $i_id;
    }
    public function get_ByImage($i_id){
        $where['i_id'] = $i_id;
        $image = $this->_db->where($where)->find();
        return $image;
    }
    public function set_UpdateImage($i_id,$data){
        $where['i_id'] = $i_id;
        $this->_db->where($where)->save($data);
    }

}